From: Tim Starling Date: Sun, 26 Sep 2004 08:06:04 +0000 (+0000) Subject: protection from multiple includes (from REL1_3A) X-Git-Tag: 1.5.0alpha1~1781 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=0c0c2dcde73edcbf66ad66c61d4897a2fe02d9e1;p=lhc%2Fweb%2Fwiklou.git protection from multiple includes (from REL1_3A) --- diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index fd4efc5e13..1abe48d8e9 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -11,6 +11,15 @@ * * @package MediaWiki */ + +/** + * The include paths change after this file is included from commandLine.inc, + * meaning that require_once() fails to detect that it is including the same + * file again. We use DIY C-style protection as a workaround. + */ +if (!defined('SITE_CONFIGURATION')) { +define('SITE_CONFIGURATION', 1); + class SiteConfiguration { var $suffixes, $wikis, $settings; var $localDatabases; @@ -84,6 +93,6 @@ class SiteConfiguration { return array( $site, $lang ); } } - +} ?>